package homework_04;

public class home_09 {
    public static void main(String[] args) {
        int[] a={-10,2,3,246,-100,0,5};
        int sum=0,max=a[0],min=0;
        double avg;
        for (int i=1;i<a.length;i++){
            if (max<a[i]){
                max=a[i];
            }
            if (min>a[i]){
                min=a[i];
            }
            sum+=a[i];
        }
        avg=sum/a.length;
        System.out.println("平均值："+avg);
        System.out.println("最大值："+max);
        System.out.println("最小值："+min);
    }
}
